home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Interactive CD Sampler / Microsoft Interactive CD Sampler.iso / DEMOS / C_Automp / AUTOTP / IMD.CST / 00012.ls < prev    next >
Encoding:
Text File  |  1996-07-16  |  913 b   |  25 lines

  1. on setPuppet x,y,reg
  2.   -- Copyright 1995 Interactive Media Design, Inc.
  3.   -- x & y values are start sprite number and end sprite number that
  4.   -- are affected. x may be substituted for a list. ie. [2,7,9] in
  5.   -- this case, y is ignored, but must have a value in that position.
  6.   -- reg - used for tracking what sprites have been puppeted. Value is 1 or 2.
  7.   -- Default value is 2. spritePuppet1 list is used for tracking sprites puppeted
  8.   -- within a small section. ie. a few frames. spritePuppet2 is used for sprites
  9.   -- that are puppeted for the duration of the movie.
  10.   global spritePuppet1, spritePuppet2
  11.   if voidP(reg) then
  12.     set reg = 1
  13.   end if
  14.   if listP(x) then
  15.     repeat with z in x
  16.       puppetSprite z, TRUE
  17.       add value("spritePuppet" & reg), z
  18.     end repeat
  19.   else
  20.     repeat with z = x to y
  21.       puppetSprite z, TRUE
  22.       add value("spritePuppet" & reg), z
  23.     end repeat
  24.   end if
  25. end